package edu.tjut.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import edu.tjut.dao.ProductDao;
import edu.tjut.domain.Product;

@RestController
public class ProductController {
	@Autowired
	private ProductDao productDao;
	
	@PostMapping("/product")
	public List<Product> productTest1(@RequestParam String key, @RequestParam String value) {
		return productDao.findByAttribute(key, value);
	}
}
